#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QPushButton* button = new QPushButton(this);

    button->move(100,100);

    resize(800,700);

    //与信号槽的连接
    connect(button,&QPushButton::clicked,this,&Widget::close);

    //断开信号与槽的连接
    disconnect(button,&QPushButton::clicked,this,&Widget::close);
}

Widget::~Widget()
{
    delete ui;
}

